package com.xh.bussiness.course.service;



import com.xh.bussiness.course.bean.dto.PrepareLessonScoreDto;
import com.xh.bussiness.course.bean.request.PrepareLessonRequest;
import com.xh.bussiness.course.model.PrepareLesson;
import com.xh.bussiness.course.model.PrepareLessonLog;
import com.xh.bussiness.course.model.PrepareLessonScore;
import com.xh.bussiness.resource.bean.dto.MaterialDto;
import com.xh.core.service.IBaseService;
import com.xh.core.bean.XhPage;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Pitt
 * @since 2020-12-15
 */
public interface IPrepareLessonService extends IBaseService<PrepareLesson> {

    /**
     * 分页查询方法
     * @param page
     * @param bean
     * @return
     */
    public XhPage queryPrepareLessonPage(XhPage page, PrepareLessonRequest bean);

    /**
     * 查询方法
     * @param bean
     * @return
     */
    public List queryPrepareLesson(PrepareLessonRequest bean);

    PrepareLesson queryByUserId(String userId, String courseId, String courseIndexId);

    Map<String, Long> queryMaterialCountById(String prepareLessonId);

    List<MaterialDto> queryMaterialByPrepareLessonId(String prepareLessonId,Integer type);

    Map<String, Object> queryPrepareLessonAnalysis(String subjectCode,String schoolId, String groupId);

    Double queryUserPrepareLessonAvgScore(String subjectCode, String userId);

    PrepareLesson submitPrepare(PrepareLesson prepareLesson);

    PrepareLessonLog checkPrepareLesson(PrepareLessonLog prepareLessonLog);

    List<PrepareLessonLog> queryPrepareLogs(String prepareLessonId);

    PrepareLessonScoreDto queryCheckResult(String prepareLessonId);

    PrepareLesson deletePrepareMaterial(String courseIndexId, String materialId);

    PrepareLesson changePrepareLessonStatus(String prepareLessonId, Integer status);
}
